﻿using System;
using System.Collections.Generic;
using EP.Base.BaseService.Manager.Model.Entity;

namespace EP.Base.BaseService.Manager.Interface.Data
{
    public interface IIndexBackupLogs
    {

        /// <summary>
        /// 更新备份日志状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        bool UpdateStateById(long id, short state);
        /// <summary>
        /// 更新最后检测信息及状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="state"></param>
        /// <param name="lastCheckTime"></param>
        /// <param name="esHandleState"></param>
        /// <returns></returns>
        bool UpdateStateAndCheckInfo(long id, short state, DateTime lastCheckTime, string esHandleState);
        /// <summary>
        /// 更新备份日志状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="state"></param>
        /// <param name="deleteTime"></param>
        /// <returns></returns>
        bool UpdateStateAndDeleteTimeById(long id, short state,DateTime deleteTime);
        /// <summary>
        /// 添加备份日志记录
        /// </summary>
        /// <param name="indexBackupLog"></param>
        /// <returns></returns>
        long Add(IndexBackupLog indexBackupLog);
        /// <summary>
        /// 查询某个索引下某个状态下所有备份记录
        /// </summary>
        /// <param name="indexConfigId"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        List<IndexBackupLog> GetIndexBackupLogsByIndexConfidId(int indexConfigId,short state);
    }
}
